package com.swak.frame.api.filter.interceptor;

import java.util.Arrays;

import org.aopalliance.aop.Advice;

import com.google.common.collect.Sets;
import com.swak.frame.filter.annotation.SwakMethod;
import com.swak.frame.interceptor.annotation.SwakAnnotationBeanPostProcessor;

@SuppressWarnings("serial")
public class ApiFilterAnnotationBeanPostProcessor extends SwakAnnotationBeanPostProcessor {

	private SwakMethodInterceptor swakMethodInterceptor;

	public ApiFilterAnnotationBeanPostProcessor() {
		super(Sets.newHashSet(Arrays.asList(SwakMethod.class)));
	}

	public ApiFilterAnnotationBeanPostProcessor(SwakMethodInterceptor swakMethodInterceptor) {
		super(Sets.newHashSet(Arrays.asList(SwakMethod.class)));
		setSwakMethodInterceptor(swakMethodInterceptor);
	}

	@Override
	public Advice getAnnotationAdvice() {
		return this.swakMethodInterceptor;
	}

	public void setSwakMethodInterceptor(SwakMethodInterceptor swakMethodInterceptor) {
		this.swakMethodInterceptor = swakMethodInterceptor;
	}
}
